package Service;

import Model.Staff;
import Model.StaffChanged;
import org.apache.ibatis.annotations.Param;
import utils.ReturnDataForLayui;
import utils.ReturnData;
import javax.servlet.http.HttpSession;
import java.io.InputStream;
import java.util.List;

public interface StaffService {
    List<Staff> getAllStaffList();
    List<StaffChanged> getAllStaffChangedList();
    /**
     * 删除护工以及它对应的权限
     * @param id
     * @return
     */
    String delStaff(int id);

    /**
     * 查询/根据id
     * @param StaffName
     * @param StaffYbid
     * @param StaffSbdw
     * @param StaffZylevel
     * @param StaffStatus
     * @return
     */
    List<Staff> findStaffInfo(String StaffName,String StaffYbid,String StaffSbdw,String StaffZylevel,List<String> StaffStatus);

    /**
     * 搜索-变更页面
     * @param nameSearch
     * @param ybidSearch
     * @param titleSearch
     * @return
     */
    List<StaffChanged> findStaffChangedInfo(@Param("nameSearch")String nameSearch,
                                            @Param("ybidSearch")String ybidSearch,
                                            @Param("titleSearch")String titleSearch);

    Staff findStaffInfobyID(Integer id);

    String updateNursing(Staff staff,String settleCode,HttpSession session);

    ReturnDataForLayui getList(Staff staff);
    ReturnDataForLayui getList2(Staff staff);
    ReturnData updatePhone(Staff staff);
    String InputExcel(InputStream is, String originalFilename,String settleCode);

    /**
     * 制定派工日程页面：查找是否存在该护工（上半页面）
     * @param StaffYbid
     * @return
     */
    List<Staff> searchStaffbyYbid(@Param("StaffYbid")String StaffYbid);

    /**
     * 制定派工日程页面：查找护工（下半页面）
     * @param NursingName
     * @param NursingYbid
     * @param NursingID
     * @return
     */
    List<Staff> searchArrangeNursing(@Param(value="NursingName")String NursingName,
                                                 @Param(value="NursingYbid")String NursingYbid,
                                                 @Param(value="NursingID")String NursingID);


    /**
     * 派工日程安排页面：权限：搜索护工
     * @param NursingName
     * @param NursingYbid
     * @param NursingID
     * @param SettleCode
     * @return
     */
     List<Staff> searchArrangeNursingbySettelCode(@Param(value="NursingName")String NursingName,
                                                  @Param(value="NursingYbid")String NursingYbid,
                                                  @Param(value="NursingID")String NursingID,
                                                  @Param(value="SettleCode")String SettleCode);
    /**
     * 微信小程序：注册：查找是否存在该护工，并插入密码
     * @param StaffID
     * @param StaffYbid
     * @param StaffPassword
     * @return
     */
    String wechatRegisterStaff(@Param(value = "StaffID") String StaffID,
                               @Param(value = "StaffYbid") String StaffYbid,
                               @Param(value="StaffPassword")String StaffPassword);


    List<Staff> getHgIdName();

    /**
     * 根据机构去查找护工的名字
     * @param settlement_code
     * @return
     */
    List<Staff> getHgNameByCode(String settlement_code);

    /**
     * 根据护工姓名查找身份证号
     * @param name
     * @return
     */
    List<Staff> getHgIdNumberByName(String name);

    /**
     * 更新护工设备（发放之后添加）
     */
    void updateHgDevice(Staff staff);

    /**
     * 护工页面添加权限：根据机构结算代码找到相应护工
     * @param settleCode
     * @return
     */
    List<Staff> getStaffbySettleCode(@Param(value="settleCode")String settleCode);

    /**
     * 护工页面添加权限：根据机构结算代码找到相应护工历史变更
     * @param settleCode
     * @return
     */
    List<StaffChanged> getStaffChangedsbySettleCode(@Param(value="settleCode")String settleCode);
    /**
     * 护工页面添加权限：查找机构的护工
     * @param StaffName
     * @param StaffYbid
     * @param StaffSbdw
     * @param StaffZylevel
     * @param StaffStatus
     * @param settleCode
     * @return
     */
    List<Staff> findStaffInfobySettleCode(@Param(value="settleCode")String settleCode,
                                          @Param(value="StaffName")String StaffName,
                                          @Param(value="StaffYbid")String StaffYbid,
                                          @Param(value="StaffSbdw")String StaffSbdw,
                                          @Param(value="StaffZylevel")String StaffZylevel,
                                          @Param(value="StaffStatus")List<String> StaffStatus);
    /**
     * 护工页面添加权限：搜索历史变更
     * @param nameSearch
     * @param ybidSearch
     * @param titleSearch
     * @param settleCode
     * @return
     */
    List<StaffChanged> findStaffChangedInfobySettleCode(@Param(value="nameSearch")String nameSearch,
                                          @Param(value="ybidSearch")String ybidSearch,
                                          @Param(value="titleSearch")String titleSearch,
                                          @Param(value="settleCode")String settleCode);

    /**
     * 根据open_id获取设备
     * @param staff
     * @return
     */
    List<Staff> getDeviceByOpenId(Staff staff);
}